package com.mirror.entity.building;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;


/**
 * 类型:Entity-建筑-房间
 */
@Entity
@Table(name = "building_room")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "building_room_sequence")
public class Room {

    /**
     * 楼层
     */
    @ManyToOne
    @JoinColumn(name = "floorInfo", referencedColumnName = "id")
    private Floor floor;
    /**
     * 房间号
     */
    private int bedsNum;
    /**
     * 房间名称
     */
    private String roomName;
    /**
     * 备注
     */
    private String memo;

    private boolean isdel;
    @Id
    @GeneratedValue(generator = "paymentableGenerator")
    @GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
    @Column(name = "ID", nullable = false, length = 32)
    private String id;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createDate;

    public boolean getIsdel() {
        return isdel;
    }

    public void setIsdel(boolean isdel) {
        this.isdel = isdel;
    }

    public Floor getFloor() {
        return floor;
    }

    public void setFloor(Floor floor) {
        this.floor = floor;
    }

    public int getBedsNum() {
        return bedsNum;
    }

    public void setBedsNum(int bedsNum) {
        this.bedsNum = bedsNum;
    }

    /**
     * 获取房间名称
     */
    public String getRoomName() {
        return roomName;
    }

    /**
     * 设置房间名称
     */
    public void setRoomName(String roomName) {
        this.roomName = roomName;
    }

    /**
     * 获取备注
     */
    public String getMemo() {
        return memo;
    }

    /**
     * 设置备注
     */
    public void setMemo(String memo) {
        this.memo = memo;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
}
